<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"   pageEncoding="UTF-8"%>
<%
	request.setCharacterEncoding("utf-8");
	String cp = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>JSP, Struts2, iBatis 를 이용한 자료실</title>
<link rel="stylesheet" href="common/common.css" type="text/css" />
<link rel="stylesheet" href="css/style.css" type="text/css"  />
<link rel="stylesheet" href="css/BoardInsert.css" type="text/css" />
<script type="text/javascript" src="scripts/util.js"></script>
<script type="text/javascript" >
	function sendIt() {
		f = document.myForm;
		
		str = f.filesubject.value;
		str = str.trim();
		if (!str) {
			alert("\n제목을 입력하세요.");
			f.filesubject.focus();
			return ;
		}
		f.filesubject.value = str;
		
		str = f.upload.value ;
		if (!str) {
			alert("\n파일을 첨부하세요.");
			f.upload.focus();
			return ;
		}
		f.upload.value = str;
		
		str = f.filecontent.value;
		str = str.trim();
		if (!str) {
			alert("내용을 입력하세요.");
			f.filecontent.focus();
			return ;
		}
		f.filecontent.value = str;
		
		f.action = "created.do";
		f.submit();
		
	}
</script>
</head>
<body>
<div id="bbs">
	<div id="bbs_title">JSP, Struts2, iBatis를 이용한 자료실</div>
	<form action="" name="myForm" method="post" enctype="multipart/form-data">
	
	<div id="bbsCreated">
		<div class="bbsCreated_bottomLine">
			<dl>
				<dt>제&nbsp;&nbsp;&nbsp;&nbsp;목</dt>
				<dd>
					<input type="text" name="filesubject" size="74" maxlength="100" class="boxTF" />
				</dd>
			</dl>
		</div>
		
		<div class="bbsCreated_bottomLine">
			<dl>
				<dt>파일첨부</dt>
				<dd>
					<input type="file" name="upload" size="35" class="boxTF" />
				</dd>
			</dl>
		</div>
	</div>
	
	</form>

</div>
</body>
</html>